//
//  MiddleView.m
//  夺宝吧
//
//  Created by xiaocai on 15/6/30.
//  Copyright (c) 2015年 FangYuan. All rights reserved.
//

#import "MiddleView.h"
#import "WYPublicWeb.h"
#import "BeforePublishVC.h"
#import "ShowOrderVC.h"
#define DETAIL_URL @"api/ApiGoods/getGoodsContent?id="

@interface MiddleView ()
{
    __weak IBOutlet UILabel *timeLab;
    
}
@end
@implementation MiddleView
//图文详情
- (IBAction)detailBtnOnClick:(id)sender {
    WYPublicWeb *web = [[WYPublicWeb alloc]init];
    NSString *newIp = [DBB_IP stringByReplacingOccurrencesOfString:@"?/" withString:@""];
    web.urlStr = [NSString stringWithFormat:@"%@%@%@",newIp,DETAIL_URL,self.pdc_id];
    web.mtitle = @"图文详情";
    [[WYMainTabBarVC shareMainTaBarVC].navigationController pushViewController:web animated:YES];
}

//往期揭晓
- (IBAction)wangqiBtnOnClick:(id)sender {
    
    BeforePublishVC *beforeVC = [[BeforePublishVC alloc]init];
    beforeVC.pdc_id = self.pdc_id;
    [[WYMainTabBarVC shareMainTaBarVC].navigationController pushViewController:beforeVC animated:YES];
}

//晒单分享
- (IBAction)saidanBtnOnClick:(id)sender {
    ShowOrderVC *showVC = [[ShowOrderVC alloc]init];
    showVC.pdc_sid = self.pdc_sid;
    showVC.isDetailFlag = YES;
    [[WYMainTabBarVC shareMainTaBarVC].navigationController pushViewController:showVC animated:YES];
}
//刷新时间
- (void)updateTimelab:(NSString *)time
{
    timeLab.text = [NSString stringWithFormat:@"所有参与记录(%@开始)",time];
}

@end
